package thread;

import java.util.Scanner;

public class SleepDemo {
    public static void main(String[] args) {
        System.out.println("请输入暂停几秒");
        Scanner scanner = new Scanner(System.in);
        int time;
        for (time = scanner.nextInt() ; time >= 0 ; time--){
            System.out.println(time);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        System.out.println("时间到");
    }
}